package org.flowers.unbeaten.generator.base;

import org.flowers.unbeaten.generator.entity.GeneratorEntity;

/**
 * @description 代码生成器抽象类
 * @author RyanWang
 * @date 2021-08-13 15:40:50
 * @version 1.0
 */
public abstract class AbstractGenerator {

    /**
     * 生成信息
     */
    protected GeneratorEntity generatorEntity;

    /**
     * 初始化配置
     */
    public void init(GeneratorEntity generatorEntity) {
        this.generatorEntity = generatorEntity;
    }

    /**
     * 执行生成
     * @return 临时路径
     * @throws Exception
     */
    public abstract String execute() throws Exception;

}
